use serde::{Deserialize, Serialize};

use crate::todo::schema::todos;

#[derive(Debug, Clone, Serialize, Deserialize, Queryable,Insertable)]
pub struct Todo {
    pub id:i32,
    pub text: String,
    pub completed:bool,
}

#[derive(Debug, Clone, Serialize,Insertable, Deserialize)]
#[table_name="todos"]
pub struct NewTodo {
    pub text: String,
    pub completed:bool,
}
